import request from '@/utils/request'
import { ApiModulesRoutes } from '@/consts.js'


/**
 * 查询通行记录（分页）
 * @param {'INTERNAL_MEMBER','VISITOR'} data.identityEnum
 * @param {Number}  data.pageNo
 * @param {boolean}  data.carOnly
 * @param {Number}  data.pageSize
 * @param {String}  data.licensePlate
 * @param {String}  data.keyword
 * @param {Number}  data.endTime
 * @param {Number}  data.startTime
 * @param {'PEOPLE_ENTER','PEOPLE_LEAVE'}  data.iotBizEnum
 * @param {Boolean}  data.black
 * @param {String}  data.orgId
 */

export function findAccessControlLogPageByParams(data) {
  return request({
    url: `${ApiModulesRoutes.BASE}/accessControl/findAccessControlLogPageByParams`,
    method: 'POST',
    data
  })
}

/**
 * 查询所有组织
 */

export function findOrgList() {
  return request({
    url: `${ApiModulesRoutes.USER}/org/findOrgList`,
    method: 'POST',
    data: {},
  })
}

/**
 * 查询设备列表（分页）
 * @param {'CAMERA','ROBOT'} data.deviceTypeEnum
 * @param {'DISABLE','ENABLE'}  data.enableStateEnum
 * @param {'ALG','COURSE','DEFAULT','DEVICE','GATEWAY','REGION','SECURITY','TRAIL','USER'}  data.excludeBusinessTypeEnum
 * @param {String}  data.gatewayId
 * @param {String}  data.keyword
 * @param {'DIRECT','FIVE_G','GATEWAY'}  data.netTypeEnum
 * @param {Boolean}  data.alg
 * @param {Boolean}  data.location
 * @param {Boolean}  data.online
 * @param {Number}  data.pageNo
 * @param {Number}  data.pageSize
 * @param {String}  data.productId
 * @param {String}  data.name
 * @param {String}  data.regionId
 * @param {String}  data.deviceId
 */

export function findDevicePageByParam(data) {
  return request({
    url: `${ApiModulesRoutes.IOT}/device/findDevicePageByParamNew`,
    method: 'POST',
    data
  })
}

